﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;

namespace IcarusProject.Tiles
{
    public class Tile
    {
        #region Attributs
        private static int _staticID = 0;
        private int _id;
        private int _textureId; // L'ID de la texture
        private bool _isWalkable; //Indique si on peut marcher dessu
        private Color _colorEffect; //Effet de couleur sur la texture finale
        #endregion

        #region Constructeur
        public Tile(int textureID)
        {
            _id = _staticID;
            _staticID++;
            _textureId = textureID;
            _isWalkable = false;
            _colorEffect = Color.White;
        }
        #endregion

        #region Proprietes
        public int ID
        {
            get { return _id; }
        }

        public bool isWalkable
        {
            get { return _isWalkable; }
        }

        public int TextureID
        {
            get { return _textureId; }
        }

        public Color ColorEffect
        {
            get { return _colorEffect; }
        }
        #endregion

        #region Methodes
        public Tile SetWalkable(bool value = true)
        {
            _isWalkable = value;
            return this;
        }

        public Tile SetColorEffect(Color c)
        {
            _colorEffect = c;
            return this;
        }
        #endregion
    }
}
